//package com.example.seckilldemo.config.mq;
//
//import org.springframework.amqp.core.Binding;
//import org.springframework.amqp.core.BindingBuilder;
//import org.springframework.amqp.core.Queue;
//import org.springframework.amqp.core.TopicExchange;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//
///**
// * @Author Wangbaba
// * @Date 2024/3/21 14:07
// * @Version 1.0
// * mq配置类:topic模式
// */
//@Configuration
//public class RabbitMQTopicConfig {
//    private static final String QUEUE01="queue_topic01";
//    private static final String QUEUE02="queue_topic02";
//    private static final String EXCHANG="topicExchange";
//    private static final String ROUTINGKEY01="#.queue.#";
//    private static final String ROUTINGKEY02="*.queue.#";
//
//    @Bean
//    public Queue queueTopic01(){
//        return new Queue(QUEUE01);
//    }
//    @Bean
//    public Queue queueTopic02(){
//        return new Queue(QUEUE02);
//    }
//    @Bean
//    public TopicExchange topicExchange(){
//        return new TopicExchange(EXCHANG);
//    }
//    @Bean
//    public Binding bindingTopic01(){
//        return BindingBuilder.bind(queueTopic01()).to(topicExchange()).with(ROUTINGKEY01);
//    }
//    @Bean
//    public Binding bindingTopic02(){
//        return BindingBuilder.bind(queueTopic02()).to(topicExchange()).with(ROUTINGKEY02);
//    }
//}
